/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 artifact_prop_growth.h

	$Header: /heroes4/artifact_prop_growth.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( ARTIFACT_PROP_GROWTH_H_INCLUDED )
#define ARTIFACT_PROP_GROWTH_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "artifact_prop_effect.h"
#include "creature_type.h"

namespace t_artifact_prop
{
	// ----------------------------------------------------------------------
	// class for creature growth effect
	// ----------------------------------------------------------------------
	class t_creature_growth : public t_base<k_artifact_effect_creature_growth>
	{
	public:
		t_creature_growth();
		t_creature_growth( int one, int two, int three, int four );

		virtual t_artifact_effect*	clone() const;
		static t_artifact_effect*	create();

		virtual bool accept( t_artifact_effect_visitor& visitor );
		int          get_bonus( int level ) const;
		virtual bool read( std::streambuf& buffer );
		void         set_bonus( int level, int amount );
		virtual bool write( std::streambuf& buffer ) const;
	protected:
		int m_bonus[k_creature_level_count];
	};

	inline 	t_creature_growth::t_creature_growth()
	{
	}

	inline 	t_creature_growth::t_creature_growth( int one, int two,  int three, int four )
	{
		m_bonus[0] = one;
		m_bonus[1] = two;
		m_bonus[2] = three;
		m_bonus[3] = four;
	}

	inline int t_creature_growth::get_bonus( int level ) const
	{
		return m_bonus[level];
	}

	inline void t_creature_growth::set_bonus( int level, int amount )
	{
		m_bonus[level] = amount;
	}

};

#endif // ARTIFACT_PROP_GROWTH_H_INCLUDED